var utils = {
	getOpenid:function(code){
      	//localStorage.removeItem("openid");
      	//alert(localStorage.getItem("openid"));
		if(!localStorage.getItem("openid")){
			$.ajax({
				url:"http://redmany.city1000.cn/red/get/openid",
				type: "post",
				data:{code:code},
				success: function(res) {
					openid = res;
					localStorage.setItem("openid", openid);
				},
				error:function() { 
					layer.msg("请求失败！");
				}
			});
		}
		return localStorage.getItem("openid");
	}
}